package com.zte.purchase.control;

import com.zte.purchase.service.impl.PurchaseImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;

@Controller
@RequestMapping("/purchase")
public class PurchaseDoAction {

    @Autowired
    private PurchaseImpl purchase;

    /**
     * 查询采购部管理职位
     * @param dept_id
     * @return
     */
    @ResponseBody
    @RequestMapping("/selectJobname")
    public ArrayList selectJobname(Integer dept_id){
        ArrayList jobname = purchase.selectJobname(dept_id);
        return jobname;
    }

    /**
     * 查找采购部管理人员名称
     * @param job_name
     * @return
     */
    @ResponseBody
    @RequestMapping("/selectUname")
    public ArrayList selectUname(String job_name){
        ArrayList uname = purchase.selectUname(job_name);
        return uname;
    }
}
